<?php


namespace app\admin\controller;


use app\admin\common\controller\Base;
use app\admin\common\model\Site as SiteModel;
use think\facade\Request;

class Site extends Base
{
    public function index(){

        $site=SiteModel::get(1);
        $this->assign('site',$site);

        $this->assign('title','网站管理');
        return $this->fetch();
    }


    //保存站点信息
    public function saveSite(){
        $data=Request::post();
        $id=$data['id'];
        unset($data['id']);
        SiteModel::where('id',$id)->update($data);
        $this->success('保存成功');
    }


}